﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OXY
{
    class Point
    {
        private float x;
        private float y;
		
		public float TungDo
		{
			get { return x; }
			set { x = value; }
		}
		
		public float HoanhDo
		{
            get { return y; }
			set { y = value; }
		}

        public Point()
        {
            x = 1f;
            y = 1f;
        }

        public Point(float x, float y)
        {
            this.x = x;
            this.y = y;
        }

        public Point(Point P)
        {
            this.x = P.x;
            this.y = P.y;
        }

        public String toString()
        {
            String temp = "(" + this.x + "," + this.y + ")";
            return temp;
        }

        public double distance(Point P)
        {
            double res = Math.Sqrt((this.x - P.x) * (this.x - P.x) + (this.y - P.y) * (this.y - P.y));
            return res;
        }
    }
}
